<template>
  <header class="header">
    <div class="header-left">
      <div class="iconfont icon-fanhui"></div>
    </div>
    <div class="header-center"><span class="iconfont icon-sousuo"></span> 输入城市/景点/游玩主题</div>
    <router-link to="/city">
      <div class="header-right"> {{this.city}}<span class="iconfont icon-xiala"></span></div>
    </router-link>
  </header>
</template>

<script type="text/ecmascript-6">
  import { mapState } from 'Vuex'

  export default {
    computed: {
      ...mapState(['city'])
    }
  }
</script>

<style lang="stylus" scoped>
  @import "~css/variable.styl"

  .header
    display flex
    line-height .86rem
    background $color-theme
    color #fff
    .header-left
      flex 0 0 .64rem
      text-align center
    .header-center
      flex 1
      margin-top .12rem
      margin-left .2rem
      padding-left .2rem
      line-height .64rem
      height .64rem
      background #fff
      border-radius .1rem
      color #ccc
      .icon-sousuo
        font-size .40rem
    .header-right
      flex 0 0 1.04rem
      padding 0 .1rem
      min-width 1.04rem
      text-align center
      color #fff
</style>
